// 7. VtpAppGoodsController.java - 商品控制器
package com.lizheng.yunservice.travel.controller;

import com.lizheng.yunservice.common.domain.ApiRestResponse;
import com.lizheng.yunservice.common.page.TableDataInfo;
import com.lizheng.yunservice.travel.doamin.bo.VtpGoodsQueryBoPageSearch;
import com.lizheng.yunservice.travel.doamin.vo.VtpGoodsVoPageSearch;
import com.lizheng.yunservice.travel.service.IVtpGoodsServicePageSearch;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/vtp/app/goods")
public class VtpAppGoodsController {
    private final IVtpGoodsServicePageSearch goodsService;

    @PostMapping("/page")
    public ApiRestResponse<TableDataInfo<VtpGoodsVoPageSearch>> getGoodsPage(
            @RequestBody VtpGoodsQueryBoPageSearch queryBo) {
        return ApiRestResponse.ok(goodsService.queryAppPageList(queryBo));
    }
}